﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="true" assembly="Mani.Patient.Business" namespace="Mani.Patient.Business.Domain.Entity">
  <class name="QuestionType" table="QuestionTypes">

    <id name="Id" type="Int32" unsaved-value="0">
      <column name="ID" sql-type="int" not-null="true" unique="true" index="questiontype_id" />
      <generator class="native" />
    </id>

    <property name="Description" column="Description" type="String" not-null="true" length="100" />
    
    <bag name="Questions" table="Questions" cascade="delete" access="property">
      <key column="QuestionTypeId" foreign-key="QuestionTypeId" />
      <one-to-many class="Question" />
    </bag>
  </class>
</hibernate-mapping>